<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>从另一个进程导入套接字</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.socket-wsaprotocol-info-export.html">« socket_wsaprotocol_info_export</a></li>
      <li style="float: right;"><a href="function.socket-wsaprotocol-info-release.html">socket_wsaprotocol_info_release »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.sockets.html">Socket 函数</a></li>
    <li>从另一个进程导入套接字</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.socket-wsaprotocol-info-import" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">socket_wsaprotocol_info_import</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.3.0, PHP 8)</p><p class="refpurpose"><span class="refname">socket_wsaprotocol_info_import</span> &mdash; <span class="dc-title">从另一个进程导入套接字</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.socket-wsaprotocol-info-import-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>socket_wsaprotocol_info_import</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$info_id</code></span>): <span class="type"><span class="type"><a href="class.socket.html" class="type Socket">Socket</a></span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   导入之前从另一个进程导出的套接字。 
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <span class="simpara">
    此方法仅在 Windows 上可用。
   </span>
  </p></blockquote>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.socket-wsaprotocol-info-import-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">info_id</code></dt>

    <dd>

     <p class="para">
      调用 <span class="function"><a href="function.socket-wsaprotocol-info-export.html" class="function">socket_wsaprotocol_info_export()</a></span> 返回的 ID。
     </p>
    </dd>

   
  </dl>

 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.socket-wsaprotocol-info-import-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <span class="classname"><a href="class.socket.html" class="classname">Socket</a></span> 实例， 或者在失败时返回 <strong><code>false</code></strong>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.socket-wsaprotocol-info-import-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
        成功时，该函数现在返回一个 <span class="classname"><a href="class.socket.html" class="classname">Socket</a></span> 实例；在此之前，返回的是 <span class="type">resource</span>。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.socket-wsaprotocol-info-import-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="function.socket-wsaprotocol-info-export.html" class="function" rel="rdfs-seeAlso">socket_wsaprotocol_info_export()</a> - 导出 WSAPROTOCOL_INFO 结构体</span></li>
  </ul>
 </div>

 
</div></div></div></body></html>